<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改用户</title>
</head>
<body>
    <form action="/manager/user/modify" method="post">
        <label for="username">用户名<input id="username" name="username" type="text" placeholder="请输入用户名" th:value="${ user.username }"></label><br>
        <label for="password">密码<input id="password" name="password" type="password" placeholder="请输入密码"></label><br>
        <label for="nickname">昵称<input id="nickname" name="nickname" type="text" placeholder="请输入昵称" th:value="${ user.nickname }"></label><br>
        <input type="hidden" name="id" th:value="${ user.id }">
        <label>授权:</label>
        <input th:each="role: ${roles}" type="checkbox" name="roleIds" th:value="${role.id}" th:text="${ role.alias }" th:checked="${ hasRoles.contains(role) }"><br>
        <input type="submit" value="修改">
    </form>
</body>
</html>